SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwbBienes
AS
SELECT     dbo.Tb_Bienes.Descripcion, dbo.vwrRubrosBienes.Descripcion AS Rubros, dbo.vwrTiposDeBienes.Descripcion AS TipoBien, 
                      dbo.Tb_Bienes.Activo
FROM         dbo.Tb_Bienes INNER JOIN
                      dbo.vwrRubrosBienes ON dbo.Tb_Bienes.Rubro = dbo.vwrRubrosBienes.ID INNER JOIN
                      dbo.vwrTiposDeBienes ON dbo.Tb_Bienes.Tipo = dbo.vwrTiposDeBienes.ID
GO
GRANT SELECT ON  [dbo].[vwbBienes] TO [AdministracionEscolar]
GRANT SELECT ON  [dbo].[vwbBienes] TO [GestionComprasySuministros]
GRANT SELECT ON  [dbo].[vwbBienes] TO [GestionContable]
GRANT SELECT ON  [dbo].[vwbBienes] TO [GestionDeposito]
GRANT SELECT ON  [dbo].[vwbBienes] TO [GestionInventario]
GRANT SELECT ON  [dbo].[vwbBienes] TO [GestionServiciosEscolares]
GRANT SELECT ON  [dbo].[vwbBienes] TO [GestionSubsidiosyRendiciones]
GRANT SELECT ON  [dbo].[vwbBienes] TO [Informatica]
GRANT SELECT ON  [dbo].[vwbBienes] TO [SoloVer]
GO
